Skip to content

PO-2816 : generate v2 user state from database#473

Merged
stephenmagill merged 6 commits intomasterfrom
PO-2816-tactical-user-entities
Apr 15, 2026
Merged

PO-2816 : generate v2 user state from database#473
stephenmagill merged 6 commits intomasterfrom
PO-2816-tactical-user-entities

Conversation

@Sean-Reed-CGI
Copy link
Copy Markdown
Contributor

@Sean-Reed-CGI Sean-Reed-CGI commented Apr 2, 2026

PO-2816
BE - Update user state to use Role based access control (RBAC), domains and cache (Opal Mode)

We are adding a new endpoint which returns an updated (V2) UserState DTO which has the shape required for the Tactical User Management Solution.

JPA Modelling Note

We have the following hierarchy of JPA entities:
UserEntity-> BusinessUnitUserEntity->BusinessUnitUserRoleEntity
This is modelled with 2 layers of @onetomany which are left as lazily loaded, as I think we don’t want permissions loaded in every use case.

@Sean-Reed-CGI Sean-Reed-CGI requested review from a team April 2, 2026 15:44
@Sean-Reed-CGI Sean-Reed-CGI force-pushed the PO-2816-tactical-user-entities branch from 11c3c4a to 0882584 Compare April 7, 2026 06:06
Comment thread src/main/java/uk/gov/hmcts/reform/opal/mappers/UserStateMapper.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/mappers/UserStateMapper.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/service/UserPermissionsService.java Outdated
Comment thread src/test/java/uk/gov/hmcts/reform/opal/service/UserPermissionsServiceV2Test.java Outdated
Comment thread src/test/java/uk/gov/hmcts/reform/opal/service/UserPermissionsServiceV2Test.java Outdated
Comment thread src/test/java/uk/gov/hmcts/reform/opal/service/UserPermissionsServiceV2Test.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/controllers/UserPermissionsController.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/controllers/UserPermissionsController.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/entity/BusinessUnitUserRoleEntity.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/entity/BusinessUnitUserRoleEntity.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/entity/DomainEntity.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/mappers/UserStateMapper.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/service/UserPermissionsService.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/opal/service/UserPermissionsService.java Outdated
marcmollins and others added 2 commits April 14, 2026 13:57
updated code and tests for AC3. updating last login when newlogin header is present and true.
Copy link
Copy Markdown

@jacobgardner1999 jacobgardner1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stephenmagill stephenmagill merged commit eec246f into master Apr 15, 2026
7 checks passed
@stephenmagill stephenmagill deleted the PO-2816-tactical-user-entities branch April 15, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants